#ifndef APOLLO_CONFIG_BASE_H_
#define APOLLO_CONFIG_BASE_H_
#include <apollo/config/detail/plateform.h>
#include <apollo/config/detail/compiler.h>
#include <apollo/config/detail/compiler_traits.h>
#include <cassert>
/**  
 * @brief  
 * @note   
 * @retval 
 * APOLLO_STATIC_ASSERT
 * APOLLO_ARRAY_SIZE
 * APOLLO_KILO_BYTE
 * APOLLO_MEGA_BYTE
 * APOLLO_GIGA_BYTE
 * APOLLO_TERA_BYTE
 * APOLLO_EXA_BYTE
 * APOLLO_KIBI_BYTE
 * APOLLO_MEBI_BYTE
 * APOLLO_GIBI_BYTE
 * APOLLO_TEBI_BYTE
 * APOLLO_EXBI_BYTE
 * APOLLO_ASSERT
 * APOLLO_ABORT
 */
 
#ifndef APOLLO_STATIC_ASSERT
    #define APOLLO_STATIC_ASSERT(e,m) static_assert(e, m)
#endif

#ifndef APOLLO_ARRAY_SIZE
    template <typename T, size_t N>
	char (&APOLLOArraySizeHelper(T (&x)[N]))[N];

	template <typename T, size_t N>
	char (&APOLLOArraySizeHelper(T (&&x)[N]))[N];

	#define APOLLO_ARRAY_SIZE(x) (sizeof(APOLLOArraySizeHelper(x)))
#endif

#ifndef APOLLO_KILO_BYTE
    #define APOLLO_KILO_BYTE(x) size_t(x) * 1000
    #define APOLLO_MEGA_BYTE(x) size_t(x) * 1000 * 1000
    #define APOLLO_GIGA_BYTE(x) size_t(x) * 1000 * 1000 * 1000
    #define APOLLO_TERA_BYTE(x) size_t(x) * 1000 * 1000 * 1000 * 1000
    #define APOLLO_EXA_BYTE(x) size_t(x) * 1000 * 1000 *1000 * 1000 * 1000

    #define APOLLO_KIBI_BYTE(x) size_t(x) * 1024
    #define APOLLO_MEBI_BYTE(x) size_t(x) * 1024 * 1024
    #define APOLLO_GIBI_BYTE(x) size_t(x) * 1024 * 1024 * 1024
    #define APOLLO_TEBI_BYTE(x) size_t(x) * 1024 * 1024 * 1024 * 1024
    #define APOLLO_EXBI_BYTE(x) size_t(x) * 1024 * 1024 * 1024 * 1024 * 1024
#endif

#ifndef APOLLO_ASSERT
    #define APOLLO_ASSERT(e, m) assert(e&&m)
#endif

#ifndef APOLLO_ABORT
    #define APOLLO_ABORT() assert(false)
#endif

#ifndef APOLLO_NULL
    #define APOLLO_NULL nullptr
#endif

#endif